package com.happy.study.config;

import com.happy.study.entity.UserEntity;
import com.happy.study.util.MapCacheUtil;

import javax.servlet.http.HttpSession;

/**
 * SpringBoot任务调度
 * 定时执行固定的任务
 */
public class CacheSchedule {


    /**
     * 调度该任务
     * 一分钟执行一次，检查缓存是否过期
     */
    public void removeCache ( HttpSession session ) {
        UserEntity userEntity = (UserEntity) session.getAttribute ( "userEntity" );
        Object cache = MapCacheUtil.getCache ( userEntity.getId ().toString () );

    }

}
